/*
2021-8-18
https://www.acwing.com/problem/content/3811/
*/
#include<iostream>
#include<cmath>
using namespace std;

int main()
{
    int T;
    cin>>T;
    while(T--)
    {
        int n;
        cin>>n;
        int res=sqrt(n);
        if(res*res==n) res*=2;
        else if(res*(res+1)>=n) res=res*2+1;
        else res=res*2+2;
        cout<<res<<endl;
    }
    return 0;
}
